package org.naivecoders.ai.functions;

import org.naivecoders.ai.types.MaybeBowl;

public class ListHeadFunction extends AbstractFunction {

	@Override
	public MaybeBowl evaluate() {
		final MaybeBowl mb = getInput(0).evaluate();
		if(!mb.isNothing()) {
			return mb.get().getHead();
		}
		return MaybeBowl.NOTHING;
	}
}
